<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Insert title here</title>
    <script src="http://cdn.bootcss.com/jquery/1.12.4/jquery.js"></script>
</head>
<body>
<form id="hello">
    <input id="tijiao" type="button" value="提交">
</form>
<script type="text/javascript">
    let ct = 0;
    for (let i = 0; i < 10; i++) {
        let str = '<input name="users[' + ct + '].username" value="name' + ct + '">';
        let str1 = '<input name="users[' + ct + '].password" value="password' + ct + '">';
        ct++;
        $('#hello').append(str).append(str1).append('<br>');
    }
    console.log($('#hello').serialize())
    $('#tijiao').click(function () {
        $.post('/addUsers', {
            "users": $('#hello').serialize(),
            "name": "name"
        }, function (data) {
            console.info(data);
        }, 'json');
    });
</script>
</body>
</html>